package me.ZFC.Text;

import java.util.Scanner;

public class Test17 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个字符串");
        String str = sc.nextLine();
        str = str.toLowerCase();
        int num1 = 0;
        int num2 = 0;
        for (int i = 0; i < str.length(); i++) {
            char c = str.charAt(i);
            if (c >= 'a' && c <= 'z') {
                num1++;
            } else if (c >= '0' && c <= '9') {
                num2++;
            }
        }
        System.out.println("字母" + num1);
        System.out.println("数字" + num2);
    }
}
